// import addValues, { subtract, multiply as multiplyValues, square } from './math';
// import * as math from './math';
const button = document.getElementById('btn');

button?.addEventListener('click', () => {
  import('./math').then((module) => {
    console.log('add', module.default(1, 2));
    console.log('Multiply', module.multiply(3, 2));
  });
});

function add(...args: number[]) {
  return args.reduce((acc, cur) => cur + acc);
}

function multiply(...args: number[]) {
  return args.reduce((acc, cur) => cur * acc);
}

// console.log(math.default(3, 8));
console.log(add(2, 3, 4, 5));

// console.log(math.subtract(3, 2));

// console.log(math.multiply(2, 4));
console.log(multiply(2, 3, 4));

// console.log(math.square(2));

export {};
